package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.LaneApply;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LaneapplyMapper;
import com.ruoyi.system.service.ILaneapplyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 数据查询Service业务层处理
 * 
 * @author lzj
 * @date 2025-04-18
 */
@Service
public class LaneapplyServiceImpl implements ILaneapplyService 
{
    @Autowired
    private LaneapplyMapper laneapplyMapper;

    /**
     * 查询数据查询
     * 
     * @param tradeId 数据查询主键
     * @return 数据查询
     */
    @Override
    public LaneApply selectLaneapplyByTradeId(String tradeId)
    {
        return laneapplyMapper.selectLaneapplyByTradeId(tradeId);
    }

    /**
     * 查询数据查询列表
     * 
     * @param laneapply 数据查询
     * @return 数据查询
     */
    @Override
    public List<LaneApply> selectLaneapplyList(LaneApply laneapply)
    {
        return laneapplyMapper.selectLaneapplyList(laneapply);
    }

    @Override
    public List<LaneApply> selectLaneApplyListGroup(String tableName)
    {
        return laneapplyMapper.selectLaneApplyListGroup(tableName);
    }

    @Override
    public List<LaneApply> selectLanesByStationHex(String stationHex, String tableName)
    {
        return laneapplyMapper.selectLanesByStationHex(stationHex, tableName);
    }

    /**
     * 新增数据查询
     * 
     * @param laneapply 数据查询
     * @return 结果
     */
    @Override
    public int insertLaneapply(LaneApply laneapply)
    {
        laneapply.setCreateTime(DateUtils.getNowDate());
        return laneapplyMapper.insertLaneapply(laneapply);
    }

    /**
     * 修改数据查询
     * 
     * @param laneapply 数据查询
     * @return 结果
     */
    @Override
    public int updateLaneapply(LaneApply laneapply)
    {
        laneapply.setUpdateTime(DateUtils.getNowDate());
        return laneapplyMapper.updateLaneapply(laneapply);
    }

    /**
     * 批量删除数据查询
     * 
     * @param tradeIds 需要删除的数据查询主键
     * @return 结果
     */
    @Override
    public int deleteLaneapplyByTradeIds(String tradeIds)
    {
        return laneapplyMapper.deleteLaneapplyByTradeIds(Convert.toStrArray(tradeIds));
    }

    /**
     * 删除数据查询信息
     * 
     * @param tradeId 数据查询主键
     * @return 结果
     */
    @Override
    public int deleteLaneapplyByTradeId(String tradeId)
    {
        return laneapplyMapper.deleteLaneapplyByTradeId(tradeId);
    }
}
